#!/usr/bin/env python
username = 'liuwei'
password = '1234.asd'

def login():
    for i in range(3):
        input_user = input('Please input username: ')
        input_pass = input('Please input password: ')
        if input_user == username and input_pass == password:
            print('登录成功!')
            break
        #elif input_user != username or input_pass != password:
        else:
            print('用户名或者密码输入错误。。')

login()


# 做得不错
